#!/usr/bin/env python
from User import *
from Stats import *
from Config import *

class Interface(Config):
    def init(self):
        self.St = Stats(self.Nick,self.Log)
        self.St.searchData()
    def draw(self):
        ratio = float(self.St.You.Kills)/float(self.St.You.Death)
        print "Nick: ",self.St.You.Name
        print "Kills: ",self.St.You.Kills,"\t Death:",self.St.You.Death
        print "Ratio: {liczba:.2f}%".format(liczba = ratio)
        print "Hits: ",self.St.You.YourHit,"/",self.St.You.EmnyHit,"{liczba:.2f}%".format(liczba =  float(self.St.You.YourHit)*100/float(self.St.You.EmnyHit))
        print "---------------------------------------------------------------------------"
        print "\t\tHits Stats"
        print "----------------------------------------------------------------------------"
        for i in range(len(self.St.Zones)):
            print self.St.Zones[i],"\t\t=\t",self.St.You.YourHitZone[i],"\t({liczba:.2f}%)".format(liczba = float(self.St.You.YourHitZone[i])*100/float(self.St.You.YourHit)),"\t=",self.St.You.EmnyHitZone[i],"\t({liczba:.2f}%)".format(liczba = float(self.St.You.EmnyHitZone[i])*100/float(self.St.You.EmnyHit))
        print "----------------------------------------------------------------------------"
        print "\t\tCTF Stats"
        print "----------------------------------------------------------------------------"
        for i in range(len(self.St.You.FlagAction)):
            print self.St.Actions[i],"\t=\t",self.St.You.FlagAction[i]," "
        print "----------------------------------------------------------------------------"
